function countTransformString(value) {
	let count = Math.floor(value)

	if (count > 9999) {
		count /= 10000
		if (count < 9999) return count.toFixed(1) + '万'
		count /= 10000
		return count.toFixed(1) + '亿'
	} else {
		count = count.toFixed(2)
		let intPart = Math.trunc(count) // 获取整数部分
		let intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
		return intPartFormat
	}

	return value
}

function moneyTransformString(value) {
	let count = Math.floor(value)

	count = count.toFixed(2)
	let intPart = Math.trunc(count) // 获取整数部分
	let intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
	return intPartFormat

	return value
}

export default {
	countTransformString,
	moneyTransformString,
}
